import os
from multiprocessing import Process


def func_one():
    print("子进程1")
    print("子进程1:%s  父进程1:%s" % (os.getpid(), os.getppid()))


def func_two():
    print("子进程2")
    print("子进程2:%s  父进程2:%s" % (os.getpid(), os.getppid()))


if __name__ == '__main__':
    p_one = Process(target=func_one)
    P_two = Process(target=func_two)
    p_one.start()
    P_two.start()
    print("主进程:%s  主进程-父进程:%s" % (os.getpid(), os.getppid()))